cmake_minimum_required(VERSION 3.4.1)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

add_library(linphone SHARED IMPORTED)
set_target_properties(linphone PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/liblinphone-armeabi-v7a.so)

add_library(gnustl_shared SHARED IMPORTED)
set_target_properties(gnustl_shared PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libgnustl_shared.so)

add_library(ffmpeg-linphone SHARED IMPORTED)
set_target_properties(ffmpeg-linphone PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}/libffmpeg-linphone-armeabi-v7a.so)

add_library(smartphone SHARED  smartphone.cpp smartphonecore.c)
target_include_directories(smartphone PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(smartphone linphone  ffmpeg-linphone gnustl_shared log)